package com.smart.campus.controller;

import com.smart.campus.dto.ShTeachers;
import com.smart.campus.interfaces.ShTeachersServiceApi;
import com.smart.campus.pojo.PagedResponse;
import com.smart.campus.service.ShTeachersService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @BelongsProject: smart-campus
 * @BelongsPackage: com.smart.campus.controller
 * @Author: JinBao shan
 * @date 2024/9/23 20:33
 * @Description: TODO
 * @Version: 1.0
 */

@RestController
public class ShTeachersController implements ShTeachersServiceApi {
    @Autowired
    private ShTeachersService teachersService;

    @Override
    public PagedResponse<ShTeachers> findShTeachersPagination(ShTeachers teachers, Integer pageNum, Integer pageSize) {
        return teachersService.findShTeachersPagination(teachers,pageNum,pageSize);
    }

    @Override
    public void addShTeachers(ShTeachers teachers) {
        teachersService.addShTeachers(teachers);
    }

    @Override
    public ShTeachers getShTeachersById(ShTeachers teachers) {
        return teachersService.getShTeachersById(teachers);
    }

    @Override
    public void updateShTeachersById(ShTeachers teachers) {
        teachersService.updateShTeachersById(teachers);
    }

    @Override
    public void deleteShTeachersById(Integer id) {
        teachersService.deleteShTeachersById(id);
    }
}
